{% extends "bpm/bpmindex.html" %}

{% block detail %}
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-success" style="box-shadow: #c6c6c6 0px 0px 5px 5px">
                <div class="panel-heading">西北区域各公司审批效率统计</div>
                <div class="panel-body" style="height: 360px;">
                    <div class="row">
                        <div class="col-lg-4">

                            <div id="bpm_time_xb" style="width:120%; height:360px;">
                                <script>
                                    $(function () {
                                            var hoststr = window.location.host
                                            var chart = echarts.init(document.getElementById('bpm_time_xb'), 'white', {renderer: 'canvas'});
                                            var url = "http://"+hoststr+"/bpm/api_bpm_time_xb?date=" + "{{ datestr }}";
                                            $.ajax({
                                                type: "GET",
                                                url: url,
                                                dataType: 'json',
                                                success: function (result) {
                                                    chart.setOption(result);
                                                }
                                            });
                                        }
                                    )
                                </script>
                            </div>

                        </div>
                        <div class="col-lg-4">
                            <div id="bpm_total_xb" style="height:360px;">
                                <script>
                                    $(function () {
                                            var hoststr = window.location.host
                                            var chart = echarts.init(document.getElementById('bpm_total_xb'), 'white', {renderer: 'canvas'});
                                            var url = "http://"+hoststr+"/bpm/api_bpm_total_xb?date=" + "{{ datestr }}";
                                            $.ajax({
                                                type: "GET",
                                                url: url,
                                                dataType: 'json',
                                                success: function (result) {
                                                    chart.setOption(result);
                                                }
                                            });
                                        }
                                    )
                                </script>
                            </div>

                        </div>

                        <div class="col-lg-4">

                            <div id="bpm_mark_xb" style="width:100%; height:360px;">
                                <script>

                                    $(function () {
                                            var hoststr = window.location.host
                                            var chart = echarts.init(document.getElementById('bpm_mark_xb'), 'white', {renderer: 'canvas'});
                                            var url = "http://"+hoststr+"/bpm/api_bpm_mark_xb?date=" + "{{ datestr }}";
                                            $.ajax({
                                                type: "GET",
                                                url: url,
                                                dataType: 'json',
                                                success: function (result) {
                                                    chart.setOption(result);
                                                }
                                            });
                                        }
                                    )
                                </script>
                            </div>

                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="row">
        <div class="col-lg-12">

            {#内容#}

            <div class="panel panel-success" style="box-shadow: #c6c6c6 0px 0px 5px 5px">
                <div class="panel-heading">西北区域公司总助及以上审批效率统计</div>
                <div class="panel-body" style="height: 240px;">
                    <div class="row">
                        <div class="col-lg-6">
                            <row class="data-table">
                                <table class="table table-bordered table-hover">
                                    <tr>
                                        <th class="info">姓名</th>
                                        <th class="warning">平均审批时间</th>
                                        <th class="success">审批单数</th>
                                    </tr>

                                    {% for item in leader_xb %}
                                        <tr>
                                            <th>{{ item.name }}</th>
                                            <th>{{ item.timenum }}小时</th>
                                            <th>{{ item.totalnum }}条</th>
                                        </tr>
                                    {% endfor %}

                                </table>
                            </row>
                        </div>
                        <div class="col-lg-3">
                            <div id="bpm_leader_xb_time" style="width:100%; height:240px;">
                                <script>
                                    $(function () {
                                            var chart = echarts.init(document.getElementById('bpm_leader_xb_time'), 'white', {renderer: 'canvas'});
                                            var hoststr = window.location.host
                                            var url = "http://"+hoststr+"/bpm/api_bpm_leader_xb_time?date=" + "{{ datestr }}";


                                            $.ajax({
                                                type: "GET",
                                                url: url,
                                                dataType: 'json',
                                                success: function (result) {
                                                    chart.setOption(result);
                                                }
                                            });
                                        }
                                    )
                                </script>
                            </div>
                        </div>
                        <div class="col-lg-3">
                            <div id="bpm_leader_xb_total" style="width:100%; height:240px;">
                                <script>
                                    $(function () {
                                            var hoststr = window.location.host
                                            var chart = echarts.init(document.getElementById('bpm_leader_xb_total'), 'white', {renderer: 'canvas'});
                                            var url = "http://"+hoststr+"/bpm/api_bpm_leader_xb_total?date=" + "{{ datestr }}";
                                            $.ajax({
                                                type: "GET",
                                                url: url,
                                                dataType: 'json',
                                                success: function (result) {
                                                    chart.setOption(result);
                                                }
                                            });
                                        }
                                    )
                                </script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>

{% endblock %}